// JavaScript Document 

//<![CDATA[
//弹出层 by ChenLiang v1.0
function LightBox(boxWidth,boxHeight,boxContent)
{
this.boxWidth=boxWidth;
this.boxHeight=boxHeight;
this.boxContent=boxContent;
var bgLayer,boxLayer;
var documentHtml=document.documentElement;
/*
this.createBgLayer=function()
{
bgLayer = document.createElement("div");
with (bgLayer)
{
className="bgLayer";
style.width=documentHtml.scrollWidth+"px";
style.height=documentHtml.scrollHeight+"px";
style.display="none";
}
document.body.insertBefore(bgLayer,document.body.firstChild);
};
*/
this.createBox=function(){
boxLayer = document.createElement("div");
with (boxLayer)
{
className = "boxLayer";
style.width=this.boxWidth + "px";
style.height = this.boxHeight +"px";
//style.position = "absolute";
style.display="none";
setAttribute("id","divcity");
attachEvent ('onmouseleave', this.hide);
};
document.body.insertBefore(boxLayer,document.body.firstChild);
};
this.init= function()
{
//this.createBgLayer();
this.createBox();
var tc = document.getElementById('divcity');
tc.innerHTML ='233333333';
//alert(tc.innerHTML);
}
// if IE 6.0
function hideShowSelect(obj)
{
if (window.navigator.userAgent.indexOf("MSIE 6.0") > 0)
{
var selectDom = document.getElementsByTagName("select");
for (var i = 0; i < selectDom.length ; i++)
{
if (obj)
selectDom[i].style.display="none";
else
selectDom[i].style.display="";
}
}
};
this.show = function()
{
hideShowSelect(true);
boxLayer.innerHTML=this.boxContent;
//bgLayer.style.display = "block";
boxLayer.style.display = "block";
//boxLayer.style.left = documentHtml.offsetWidth /2 - boxLayer.offsetWidth/2 +"px";
//boxLayer.style.top = documentHtml.scrollTop + documentHtml.offsetHeight/2 - this.boxHeight/2 -30 + "px";
//var divtop = document.getElementById('city');
//boxLayer.style.left = divtop.offsetLeft + 170 + "px";
//boxLayer.style.top = divtop.offsetTop + 115 + "px";
var centercity = document.getElementById('centercity');
centercity.className="city_relative";
boxLayer.style.left = centercity.offsetLeft + 50 + "px";
boxLayer.style.top = centercity.offsetTop + 15 + "px";

}
this.hide = function()
{
hideShowSelect(false);
//bgLayer.style.display = "none";
boxLayer.style.display = "none";
}
this.onmouseout= function()
{
	this.hide();
}
}
//]]>



//调用方法
var loadBox= new LightBox(240,150);
	window.onload=function(){
	loadBox.init();
	loadBox.boxContent='<table width="100%" class="mytable"  ><tr height="20" align="center"><td></td><td><a href="city/city.html" class="cityalink">北京</a></td><td><a href="city/city.html" class="cityalink">上海</a></td><td><a href="city/city.html" class="cityalink">深圳</a></td><td><a href="city/city.html" class="cityalink">杭州</a></td></tr><tr height="20" align="center"><td><a href="city.html" class="cityalink">东 北</a></td><td><a href="city.html" class="cityalink">北京</a></td><td><a href="city.html" class="cityalink">天津</a></td><td><a href="city.html" class="cityalink">沈阳</a></td><td><a href="city.html" class="cityalink">大连</a></td></tr><tr height="20" align="center"><td>东 南</td><td>上海</td><td>深圳</td><td>广州</td><td>杭州</td></tr><tr height="20" align="center"><td>西 南</td><td>重庆</td><td>成都</td><td>昆明</td><td>武汉</td></tr><tr height="20" align="center"><td>西 北</td><td>西安</td><td>天水</td><td>兰州</td><td>青海</td></tr><tr height="20" align="center"><td>其 他</td><td>温州</td><td>厦门</td><td>苏州</td><td>太原</td></tr></table>';
}

function setOverFilterBG(tdid){
	tdid.className='myfilterover';
}

function setUnChooseFilterBG(tdid){
	tdid.className='';
}

function setChooseFilterBG(tdid){
	tdid.className='myfilterchoose';
}

//setTimeout("setcolor",1000);

function setcolor(){
		
}

